package com.d3works.apps.quality.service;

import com.d3works.apps.quality.db.ControlPoint;
import com.d3works.apps.quality.db.QualityControl;
import com.d3works.apps.quality.db.QualityProcess;
import com.d3works.exception.D3worksException;
import com.google.inject.persist.Transactional;
import java.io.IOException;
import java.util.List;
import javax.mail.MessagingException;
import wslite.json.JSONException;

public interface QualityControlService {

  @Transactional(rollbackOn = {Exception.class})
  public void preFillOperations(QualityControl control, QualityProcess qualityProcess)
      throws D3worksException;

  @Transactional
  public void preFillOperationsFromOptionals(
      QualityControl qualityControl, List<ControlPoint> optionalControlPointList);

  void sendEmail(QualityControl qualityControl)
      throws ClassNotFoundException, InstantiationException, IllegalAccessException,
          MessagingException, IOException, D3worksException, JSONException;
}
